# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.FirebaseAppDistribution.V1.Model.GdataDiffUploadResponse do
  @moduledoc """
  Backend response for a Diff upload request. For details on the Scotty Diff protocol, visit http://go/scotty-diff-protocol.

  ## Attributes

  *   `objectVersion` (*type:* `String.t`, *default:* `nil`) - The object version of the object at the server. Must be included in the end notification response. The version in the end notification response must correspond to the new version of the object that is now stored at the server, after the upload.
  *   `originalObject` (*type:* `GoogleApi.FirebaseAppDistribution.V1.Model.GdataCompositeMedia.t`, *default:* `nil`) - The location of the original file for a diff upload request. Must be filled in if responding to an upload start notification.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :objectVersion => String.t() | nil,
          :originalObject =>
            GoogleApi.FirebaseAppDistribution.V1.Model.GdataCompositeMedia.t() | nil
        }

  field(:objectVersion)
  field(:originalObject, as: GoogleApi.FirebaseAppDistribution.V1.Model.GdataCompositeMedia)
end

defimpl Poison.Decoder, for: GoogleApi.FirebaseAppDistribution.V1.Model.GdataDiffUploadResponse do
  def decode(value, options) do
    GoogleApi.FirebaseAppDistribution.V1.Model.GdataDiffUploadResponse.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.FirebaseAppDistribution.V1.Model.GdataDiffUploadResponse do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
